import 'package:boss/color_constant.dart';
import 'package:boss/textStyle/text_style.dart';
import 'package:boss/ui/page/miniProgram/miniProgramConfig/mini_program_config_page.dart';
import 'package:boss/ui/widget/button/radius_button.dart';
import 'package:boss/ui/widget/center_title_app_bar.dart';
import 'package:boss/ui/widget/shadow_radius_card.dart';
import 'package:flutter/material.dart';
import 'package:hi_common/hi_common.dart';
import 'package:router/annotation.dart';

@RouterConfig(MiniProgramConfigPreviewPage.pageName)
class MiniProgramConfigPreviewPage extends StatefulWidget {
  static const pageName = '/MiniProgramConfigPreviewPage';

  @override
  _MiniProgramConfigPreviewPageState createState() => _MiniProgramConfigPreviewPageState();
}

class _MiniProgramConfigPreviewPageState extends BaseState<MiniProgramConfigPreviewPage> {
  _MiniProgramConfigPreviewPageState() : super(MiniProgramConfigPreviewPage.pageName);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: CenterTitleAppBar(title: '扫码点餐'),
      body: Container(
        alignment: Alignment.topCenter,
        child: ShadowRadiusCard(
          width: 690.w,
          height: 180.w,
          margin: EdgeInsets.only(top: 220.w),
          padding: EdgeInsets.only(top: 30.w, left: 20.w, right: 14.w, bottom: 30.w),
          child: Row(
            children: [
              Expanded(
                child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Text('1、生成/绑定桌号点餐二维码', style: TextStyleConstant().normal_1_28),
                    Container(
                      margin: EdgeInsets.only(left: 40.w),
                      child: Text(
                        '生成/绑定桌号点餐二维码后，顾客才能\n正常使用扫码点餐',
                        style: TextStyleConstant().normal_2_24,
                      ),
                    ),
                  ],
                ),
              ),
              RadiusButton(
                margin: EdgeInsets.only(left: 15.w),
                width: 120.w,
                height: 40.w,
                title: '去完成',
                color: ColorConstant.ffdde2fd,
                textStyle: TextStyleConstant().blue_24,
                onTap: () {
                  Navigator.pushNamed(context, MiniProgramConfigPage.pageName);
                },
              ),
            ],
          ),
        ),
      ),
    );
  }
}
